<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改会员')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-member-edit" th:object="${erpMember}">
            <input name="memberOpenId" th:field="*{memberOpenId}" type="hidden">
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label is-required">会员ID：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="memberId" th:field="*{memberId}" class="form-control" type="text" required>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">上级ID：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="parentId" th:field="*{parentId}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">创建者ID：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="createUserId" th:field="*{createUserId}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">更新者ID：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="updateUserId" th:field="*{updateUserId}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">-->
<!--                <label class="col-sm-3 control-label">备注：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">
                <label class="col-sm-3 control-label">用户昵称：</label>
                <div class="col-sm-8">
                    <textarea name="memberNickname" class="form-control">[[*{memberNickname}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">手机号：</label>
                <div class="col-sm-8">
                    <input name="memberMobile" th:field="*{memberMobile}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">姓名：</label>
                <div class="col-sm-8">
                    <input name="memberName" th:field="*{memberName}" class="form-control" type="text">
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">详细地址：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="memberAddress" th:field="*{memberAddress}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">最后登录时间：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <div class="input-group date">-->
<!--                        <input name="memberLastLoginTime" th:value="${#dates.format(erpMember.memberLastLoginTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<!--                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">纬度：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="latitude" th:field="*{latitude}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">经度：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="longitude" th:field="*{longitude}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">会员状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('member_status')}">
                        <input type="radio" th:id="${'memberStatus_' + dict.dictCode}" name="memberStatus" th:value="${dict.dictValue}" th:field="*{memberStatus}">
                        <label th:for="${'memberStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">会员类型：</label>
                <div class="col-sm-8">
                    <select name="memberType" class="form-control m-b" th:with="type=${@dict.getType('erp_member_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{memberType}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "erp/member";
        $("#form-member-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-member-edit').serialize());
            }
        }

        $("input[name='memberLastLoginTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>